/*
 * Copyright© 2013-2018 YZTC 
 * Author zhenghl 
 * 本公司保留所有下述内容的权利; 
 * 本内容为保密信息，仅限本公司内部使用; 
 * 非经本公司书面许可，任何人不得外泄或用于其他目的; 
*/
package com.wxmp.core.spring;
import java.io.UnsupportedEncodingException;
import com.alibaba.fastjson.JSONObject;
public class JsonView {
    private Integer errcode = 0;
    private String message;
    private Object data;
    public JsonView(Integer errcode, String message) {
        this.errcode = errcode;
        this.message = message;
    }
    public JsonView(Integer errcode) {
        this.errcode = errcode;
    }
    public JsonView() {
    }
    public Integer getErrcode() {
        return errcode;
    }
    public void setErrcode(Integer errcode) {
        this.errcode = errcode;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
    public Object getData() {
        return data;
    }
    public void setData(Object data) {
        this.data = data;
    }
    public String toString() {
        return JSONObject.toJSONString(this);
    }
    public String toIso8859String() throws UnsupportedEncodingException {
        return new String(this.toString().getBytes(), "ISO-8859-1");
    }
}
